#include "memdruk.h"

#ifdef __cplusplus
#include <cstdio>
#else
#include <stdio.h>
#endif

void drukHex(void *ptr, int n) {
  int i;
  unsigned char *pChar;
  pChar = (unsigned char*) ptr;
  printf("[");
  for (i=0; i<n; i++) {
    if(i!=0)
      printf(",");
    printf("%2X", *(pChar+i));
  }
  printf("]");
}

void drukHexInd(void *ptr, int n) {
  int i;
  unsigned char *pChar;
  pChar = (unsigned char*) ptr;
  for (i=0; i<n; i++)
    printf("ptr+%d: %2X\n", i, *(pChar+i));
}